package com.jeesite.modules.rt.entity;

import javax.validation.constraints.Size;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 硬件信息Entity
 * @author 李寒冰
 * @version 2024-09-26
 */
@Table(name="rt_device_hardware", alias="a", label="硬件信息信息", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="device_id", attrName="deviceId", label="设备ID"),
		@Column(name="xt_total", attrName="xtTotal", label="总容量"),
		@Column(name="xt_used", attrName="xtUsed", label="已使用容量"),
		@Column(name="name", attrName="name", label="磁盘名称", queryType=QueryType.LIKE),
		@Column(name="rawait", attrName="rawait", label="读延迟"),
		@Column(name="ioutil", attrName="ioutil", label="负载率"),
		@Column(name="wawait", attrName="wawait", label="写延迟"),
		@Column(name="report_time", attrName="reportTime", label="数据上报日期"),
		@Column(name="serial", attrName="serial", label="磁盘序列号"),
		@Column(name="is_cache", attrName="isCache", label="是否为加速版 ", comment="是否为加速版 （0否  1是）"),
		@Column(name="type", attrName="type", label="磁盘类型"),
		@Column(name="temperature", attrName="temperature", label="磁盘温度"),
		@Column(name="total", attrName="total", label="磁盘总大小", comment="磁盘总大小（单位：G）"),
		@Column(name="used", attrName="used", label="磁盘使用量", comment="磁盘使用量（单位：G）"),
		@Column(name="ips", attrName="ips", label="每秒读"),
		@Column(name="ops", attrName="ops", label="每秒写"),
		@Column(name="mem_total", attrName="memTotal", label="核数"),
		@Column(name="cpu_core", attrName="cpuCore", label="内存"),
		@Column(name="sn", attrName="sn", label=""),
		@Column(name="mem_used_rate", attrName="memUsedRate", label=""),
		@Column(name="cpu_used_rate", attrName="cpuUsedRate", label=""),
		@Column(name="update_time", attrName="updateTime", label="更新时间", isUpdateForce=true),
	}, orderBy="a.id DESC"
)
public class RtDeviceHardware extends DataEntity<RtDeviceHardware> {
	
	private static final long serialVersionUID = 1L;
	private String deviceId;		// 设备ID
	private String xtTotal;		// 总容量
	private String xtUsed;		// 已使用容量
	private String name;		// 磁盘名称
	private String rawait;		// 读延迟
	private String ioutil;		// 负载率
	private String wawait;		// 写延迟
	private String reportTime;		// 数据上报日期
	private String serial;		// 磁盘序列号
	private String isCache;		// 是否为加速版 （0否  1是）
	private String type;		// 磁盘类型
	private String temperature;		// 磁盘温度
	private String total;		// 磁盘总大小（单位：G）
	private String used;		// 磁盘使用量（单位：G）
	private String ips;		// 每秒读
	private String ops;		// 每秒写
	private String memTotal;		// 核数
	private String cpuCore;		// 内存
	private Date updateTime;		// 更新时间
	private String sn;
	private Double memUsedRate;
	private Double cpuUsedRate;

	public Double getCpuUsedRate() {
		return cpuUsedRate;
	}

	public void setCpuUsedRate(Double cpuUsedRate) {
		this.cpuUsedRate = cpuUsedRate;
	}

	public Double getMemUsedRate() {
		return memUsedRate;
	}

	public void setMemUsedRate(Double memUsedRate) {
		this.memUsedRate = memUsedRate;
	}

	public String getSn() {
		return sn;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}

	public RtDeviceHardware() {
		this(null);
	}
	
	public RtDeviceHardware(String id){
		super(id);
	}
	
	@Size(min=0, max=50, message="设备ID长度不能超过 50 个字符")
	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}
	
	@Size(min=0, max=255, message="总容量长度不能超过 255 个字符")
	public String getXtTotal() {
		return xtTotal;
	}

	public void setXtTotal(String xtTotal) {
		this.xtTotal = xtTotal;
	}
	
	@Size(min=0, max=255, message="已使用容量长度不能超过 255 个字符")
	public String getXtUsed() {
		return xtUsed;
	}

	public void setXtUsed(String xtUsed) {
		this.xtUsed = xtUsed;
	}
	
	@Size(min=0, max=255, message="磁盘名称长度不能超过 255 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Size(min=0, max=255, message="读延迟长度不能超过 255 个字符")
	public String getRawait() {
		return rawait;
	}

	public void setRawait(String rawait) {
		this.rawait = rawait;
	}
	
	@Size(min=0, max=255, message="负载率长度不能超过 255 个字符")
	public String getIoutil() {
		return ioutil;
	}

	public void setIoutil(String ioutil) {
		this.ioutil = ioutil;
	}
	
	@Size(min=0, max=255, message="写延迟长度不能超过 255 个字符")
	public String getWawait() {
		return wawait;
	}

	public void setWawait(String wawait) {
		this.wawait = wawait;
	}
	
	@Size(min=0, max=255, message="数据上报日期长度不能超过 255 个字符")
	public String getReportTime() {
		return reportTime;
	}

	public void setReportTime(String reportTime) {
		this.reportTime = reportTime;
	}
	
	@Size(min=0, max=255, message="磁盘序列号长度不能超过 255 个字符")
	public String getSerial() {
		return serial;
	}

	public void setSerial(String serial) {
		this.serial = serial;
	}
	
	@Size(min=0, max=255, message="是否为加速版 长度不能超过 255 个字符")
	public String getIsCache() {
		return isCache;
	}

	public void setIsCache(String isCache) {
		this.isCache = isCache;
	}
	
	@Size(min=0, max=255, message="磁盘类型长度不能超过 255 个字符")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Size(min=0, max=255, message="磁盘温度长度不能超过 255 个字符")
	public String getTemperature() {
		return temperature;
	}

	public void setTemperature(String temperature) {
		this.temperature = temperature;
	}
	
	@Size(min=0, max=255, message="磁盘总大小长度不能超过 255 个字符")
	public String getTotal() {
		return total;
	}

	public void setTotal(String total) {
		this.total = total;
	}
	
	@Size(min=0, max=255, message="磁盘使用量长度不能超过 255 个字符")
	public String getUsed() {
		return used;
	}

	public void setUsed(String used) {
		this.used = used;
	}
	
	@Size(min=0, max=255, message="每秒读长度不能超过 255 个字符")
	public String getIps() {
		return ips;
	}

	public void setIps(String ips) {
		this.ips = ips;
	}
	
	@Size(min=0, max=255, message="每秒写长度不能超过 255 个字符")
	public String getOps() {
		return ops;
	}

	public void setOps(String ops) {
		this.ops = ops;
	}
	
	@Size(min=0, max=255, message="核数长度不能超过 255 个字符")
	public String getMemTotal() {
		return memTotal;
	}

	public void setMemTotal(String memTotal) {
		this.memTotal = memTotal;
	}
	
	@Size(min=0, max=255, message="内存长度不能超过 255 个字符")
	public String getCpuCore() {
		return cpuCore;
	}

	public void setCpuCore(String cpuCore) {
		this.cpuCore = cpuCore;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	
}